121
Shaping up
121
8.2 LIST OF SHAPES
This program will create a list of these objects in the format below.
AutoShape Type
Type
Name
Label
msoShapeRectangle
msoAutoShape
Rectangle 1
People
msoShapeRectangle
msoAutoShape
Rectangle 260
Earnings
msoShapeMixed
msoAutoShape
Elbow Connector 5
msoShapeOval
msoAutoShape
Oval 6
Taxes
msoShapeMixed
msoAutoShape
Elbow Connector 261
Creating a list like this is very useful when you are specifically looking for items
in a complex diagram, or you simply want to create some documentation and want
to make sure you are not missing an entity in your thesis or spell a word incorrectly.
Here is the code.
STEP 1
Public msoShapeTypeName As Variant
Public msoShapeTypeValue As Variant
Public msoShapeTypeDescription As Variant
Public msoAutoShapeTypeName() As String
Public msoAutoShapeTypeValue() As String
Public msoAutoShapeTypeDescription() As String
Public k As Integer
Sub ListShapes()
msoShapeTypeName = Array(“Name”, “mso3DModel”, “msoAutoShape”,
“msoCallout”, “msoCanvas”, “msoChart”, “msoComment”, “msoContentApp”,
“msoDiagram”, “msoEmbeddedOLEObject”, “msoFormControl”, “msoFreeform”,
“msoGraphic”, “msoGroup”, “msoIgxGraphic”, “msoInk”, “msoInkComment”,
“msoLine”, “msoLinked3DModel”, “msoLinkedGraphic”, “msoLinkedOLEObject”,
“msoLinkedPicture”, “msoMedia”, “msoOLEControlObject”, “msoPicture”,
“msoPlaceholder”, “msoScriptAnchor”, “msoShapeTypeMixed”, “msoTable”,
“msoTextBox”, “msoTextEffect”, “msoWebVideo”)
msoShapeTypeValue = Array(“Value”, “30”, “1”, “2”, “20”, “3”, “4”, “27”, “21”, “7”,
“8”, “5”, “28”, “6”, “24”, “22”, “23”, “9”, “31”, “29”, “10”, “11”, “16”, “12”, “13”,
“14”, “18”, “-2”, “19”, “17”, “15”, “26”)
msoShapeTypeDescription = Array(“Description”, “3D model”, “AutoShape”,
“Callout”, “Canvas”, “Chart”, “Comment”, “Content Office Add-in”, “Diagram”,
“Embedded OLE object”, “Form control”, “Freeform“, ”Graphic”, “Group”, “SmartArt
graphic”, “Ink”, “Ink comment”, “Line”, “Linked 3D model”, “Linked graphic”,
“Linked OLE object”, “Linked picture”, “Media”, “OLE control object”, “Picture”,
“Placeholder”, “Script anchor”, “Mixed shape type”, “Table”, “Text box”, “Text
effect”, “Web video”)
ConstText = _
“Name, msoShape10pointStar, msoShape12pointStar, msoShape16pointStar,
msoShape24pointStar, msoShape32pointStar, msoShape4pointStar,
msoShape5pointStar, msoShape6pointStar, msoShape7pointStar, msoShape8pointStar,
msoShapeActionButtonBackorPrevious, msoShapeActionButtonBeginning,
msoShapeActionButtonCustom,